package com.syh.jn.scm.domain.upstream.repository.base;

import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.jn.scm.domain.upstream.entity.base.logistics.UpLogistics;
import com.syh.jn.scm.domain.upstream.entity.base.logistics.UpLogisticsAddress;
import com.syh.jn.scm.domain.upstream.entity.base.logistics.UpLogisticsTruck;
import com.syh.jn.scm.dto.upstream.base.logistics.logisticsAddress.UpLogisticsAddressVo;
import com.syh.jn.scm.dto.upstream.base.logistics.logisticsTruck.UpLogisticsTruckVo;

import java.util.List;

public interface UpLogisticsRepository extends UpLogisticsReadRepository, AggregateRepository<UpLogistics, Long> {
  /**
   * 批量保存物流服务地址
   * @param addressList
   */
  void batchSaveAddress(List<UpLogisticsAddress> addressList);

  /**
   * 批量修改物流服务地址
   * @param addressList
   */
  void batchModifyAddress(List<UpLogisticsAddress> addressList);

  /**
   * 根据地址id获取地址
   * @param addressId
   * @return
   */
  UpLogisticsAddress getByAddressId(Long addressId);

  /**
   * 删除地址
   * @param address
   */
  void deleteAddress(UpLogisticsAddress address);

  /**
   * 批量保存物流服务车型
   * @param truckList
   */
  void batchSaveTruck(List<UpLogisticsTruck> truckList);

  /**
   * 批量修改物流服务车型
   * @param truckList
   */
  void batchModifyTruck(List<UpLogisticsTruck> truckList);

  /**
   * 删除车型
   * @param
   */
  void deleteTruck(UpLogisticsTruck truck);

  /**
   * 根据车型id查询车型
   * @param truckId
   * @return
   */
  UpLogisticsTruck getByTruckId(Long truckId);
  /**
   * 根据物流id获取地址列表
   * @param logisticsId
   * @return
   */
  List<UpLogisticsAddressVo> getAddressListById(Long logisticsId);

  /**
   * 根据物流id获取服务服务车型列表
   * @param logisticsId
   * @return
   */
  List<UpLogisticsTruckVo> getTruckListById(Long logisticsId);
}
